import {createPinia} from "pinia";
import {createPersistedState} from 'pinia-plugin-persistedstate'
import {App} from "vue";

const setupPinia = async (app: App) => {
    const pinia = createPinia();
    pinia.use(
        createPersistedState({
            key: id => `__persisted__${id}`,
            storage: localStorage
        })
    )
    app.use(pinia);
}

export * from "./app"
export * from "./dict"
export * from "./auth"
export default setupPinia;
